home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / cshx86.zip / SAMPLES / MAKECPGM.CSH < prev    next >
Text File  |  1993-04-14  |  585b  |  24 lines

  1. #    "Make" the c programs in this directory.
  2. #    Copyright (c) 1989-1992 by Hamilton Laboratories.  All rights reserved.
  3.         
  4. # Just discard any wildcards that don't produce matches.
  5. set nonomatch = 2
  6.  
  7. proc make(cfile)
  8.  
  9.     # make (i.e., recompile) a given .c file if
  10.     #   a) there's no corresponding .exe, or
  11.     #   b) the .exe is older than the .c file or any of the .h headers (if
  12.     #      there are any).
  13.  
  14.     set root = $cfile:r
  15.     if (! -e $root.exe || ! `newer $root.exe $i *.h`) then
  16.         cl -debug:none -Dcdecl= $cfile
  17.         rm $root.obj
  18.     end
  19. end
  20.  
  21. foreach i (*.c)
  22.     make $i
  23. end
  24.